Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

323
Views
How to get a button hidden when [disabled]="true"

Button is getting disabled, but I wanted it to hide from UI if the disabled condition is true -

<button ion-button block 
    class="button-color-blue"
    [disabled]="true" 
    (click)="closePage()">
    Cancel
</button>
over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

Have you tried with something like :

// NOT RENDERED AL ALL
<button ion-button block class="button-color-blue" *ngIf="condition===false" [disabled]="true" (click)="closePage()">Cancel</button

// HIDE ONLY
<button ion-button block class="button-color-blue" [style.display-none]="true" [disabled]="true" (click)="closePage()">Cancel</button>
over 4 years ago · Santiago Trujillo Report

0

I fixed this issue, it was my mistake, instead of disabled I used hidden

so,

instead of this -

<button ion-button block class="button-color-blue" [disabled]="true" (click)="closePage()">Cancel</button>

use this if you wanted invisible of item

  <button ion-button block class="button-color-blue" [hidden]="true" (click)="closePage()">Cancel</button>
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!